1.1 Learning the Echo rem CD dir command
Learning points:1. Display information: Echo2. Comment Statement: REM3. Directory Switching: CD4. Column File name: dir
One, display information: Echo
Before we learn the echo command, we'll build a new
-- This article comes from TTT blog: http://www.yoyotao.net/ttt/, original address: http://www.yoyotao.net/ttt/post/139.html
Preface:Although it was a bit of research on batch processing in the past, I have never understood the for command
Format: for [parameter]% variable name in (related file or command) do execution command
Function: Executes specific commands on one or a set of files, strings, or on each object in the result of a command to achieve the desired result.Note: When
For help documentExecutes a specific command on each file in a set of files.
For%variable in (set) do command [Command-parameters]
%variable specifies a single letter replaceable parameter.
(set) to specify one or a set of files. You can use
A For command is a command that runs in the command line or batch for a series of objects to execute one or more commands cyclically in sequence. Combined with some programs in Windows Management, its processing capabilities are powerful, and its
Lsof (listopenfiles) is a tool used to list open files in the current system. In linux, everything exists in the form of a file. through a file, you can not only access common data, but also access network connections and hardware.
Therefore, for
1. Introduction to simple batch processing internal commands
1. Echo commandEnable or disable the request echo function or display messages. If no parameters exist, the echo command displays the current echo settings.SyntaxEcho [{on | off}]
Determines whether the directory is empty, true is null, false is not empty function Is_empty_dir ($fp) {$H = @ opendir ($fp), $i =0, while ($_file=readdir ($H)) {$i + +;} Closedir ($H); if ($i >2) {return false;} Else{return true;}} 1. Determine if
NET use \\ip\ipc$ ""/user: "" to establish an IPC NULL linkNET use \\ip\ipc$ "password"/user: "User name" to establish IPC non-null linkNET use h: \\ip\c$ "password"/user: "username" direct login after mapping each other C: to local forH:NET use H: \
People who have played Linux will know that there are many commands in Linux, but people who have played Linux never bother because Linux commands are so much, because we only need to master the commands we use most often. Of course, you can also
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.